package com.dormms.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dormms.bean.ProclamationInfo;
import com.dormms.bean.Role;
import com.dormms.dto.ProclamationInfoRole;

public interface ProclamationDao {
	//获取公告信息列表
	public List<ProclamationInfo> queryProclamationInfo(@Param("proclamationInfo")ProclamationInfo proclamationInfo);
	//插入公告信息表
	public Integer insertProclamationInfo(ProclamationInfo proclamationInfo);
	//更新公告信息表
	public Integer updateProclamationInfo(ProclamationInfo proclamationInfo);
	//判断推送信息是否存在
	public Integer isExistProclamationInfoRole(ProclamationInfoRole proclamationInfoRole);
	//插入到推送信息表
	public Integer insertProclamationInfoRole(ProclamationInfoRole proclamationInfoRole);
	//根据公告信息号获取推送角色
	public List<Role> queryRoleInfoByProclamationId(Integer proclamationId);
	//根据公告信息号来获取信息
	public ProclamationInfo queryProclamationInfoByProclamationId(Integer proclamationId);
	//根据角色Id获取公告
	public List<ProclamationInfo> queryAllProclamationInfoByRoleId(@Param("proclamationInfo")ProclamationInfo proclamationInfo,@Param("roleId") Integer roleId);
	public List<Integer> queryAllRoleIdByProclamationId(Integer proclamationId);
	public Integer deleteProclamationRole(@Param("proclamationId")Integer proclamationId, @Param("roleId")Integer roleId);
	public Integer deleteProclamation(Integer proclamationId);
}
